﻿Public Class FunctionCode

#Region "未修改"

    '实时数据读
    Public Const ByteRead As Byte = &H65
    Public Const ShortRead As Byte = &H66
    Public Const SingleRead As Byte = &H3

    '实时数据写入
    Public Const ByteWrite As Byte = &H5
    Public Const ShortWrite As Byte = &H67
    Public Const SingleWrite As Byte = &H6

#End Region

#Region "已修改"

    '参数读取
    Public Const PByteRead As Byte = &H3
    Public Const PShortRead As Byte = &H3
    Public Const PSingleRead As Byte = &H3

    '参数写入
    Public Const PByteWrite As Byte = &H6
    Public Const PShortWrite As Byte = &H6
    Public Const PSingleWrite As Byte = &H6


    '历史数据读取
    Public Const HistoryByteRead As Byte = &H41
    '历史数据返回功能码
    Public Const HistoryByteReadReturn As Byte = &H43
    '历史数据返回下半页
    'Public Const HistoryByteRead2 As Byte = &H44


    '只读寄存器读
    Public Const WordReadonly As Byte = &H4

    '可写寄存器读
    Public Const WordWritableRead As Byte = &H3

    '写单个寄存器
    Public Const WordWrite As Byte = &H6

    '写多个寄存器
    Public Const MultiWordWrite As Byte = &H10

#End Region

End Class
